package Test;

abstract class Shape{
    public String name;
    public int age;
    public  abstract void draw();
}

class Cycle extends Shape{
    @Override
    public void draw() {
        System.out.println("⚪！");
    }
}

class Rectangle extends Shape{
    @Override
    public void draw() {
        System.out.println("矩形！");
    }
}

public class Test09 {
    public static void DrawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        Shape[] shapes = {new Cycle(),new Rectangle()};
        for (Shape shape:shapes) {
            DrawMap(shape);
        }
    }
}
